; generated by ARM C/C++ Compiler, 4.1 [Build 481]
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o..\OUT\stm32f10x_adc.o --depend=..\OUT\stm32f10x_adc.d --cpu=Cortex-M3 --apcs=interwork -O0 -I..\Libraries\inc -I..\CMSIS -I..\users -I..\Libraries\src -I..\Libraries\sys -I..\COMM -I..\MOD -I..\CAN -IC:\Keil\ARM\INC -IC:\Keil\ARM\INC\ST\STM32F10x -D__MICROLIB -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER --omf_browse=..\OUT\stm32f10x_adc.crf ..\Libraries\src\stm32f10x_adc.c]
                          THUMB

                          AREA ||i.ADC_AnalogWatchdogCmd||, CODE, READONLY, ALIGN=2

                  ADC_AnalogWatchdogCmd PROC
;;;1081     */
;;;1082   void ADC_AnalogWatchdogCmd(ADC_TypeDef* ADCx, uint32_t ADC_AnalogWatchdog)
000000  460a              MOV      r2,r1
;;;1083   {
;;;1084     uint32_t tmpreg = 0;
000002  2100              MOVS     r1,#0
;;;1085     /* Check the parameters */
;;;1086     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1087     assert_param(IS_ADC_ANALOG_WATCHDOG(ADC_AnalogWatchdog));
;;;1088     /* Get the old register value */
;;;1089     tmpreg = ADCx->CR1;
000004  6841              LDR      r1,[r0,#4]
;;;1090     /* Clear AWDEN, AWDENJ and AWDSGL bits */
;;;1091     tmpreg &= CR1_AWDMode_Reset;
000006  4b02              LDR      r3,|L1.16|
000008  4019              ANDS     r1,r1,r3
;;;1092     /* Set the analog watchdog enable mode */
;;;1093     tmpreg |= ADC_AnalogWatchdog;
00000a  4311              ORRS     r1,r1,r2
;;;1094     /* Store the new register value */
;;;1095     ADCx->CR1 = tmpreg;
00000c  6041              STR      r1,[r0,#4]
;;;1096   }
00000e  4770              BX       lr
;;;1097   
                          ENDP

                  |L1.16|
                          DCD      0xff3ffdff

                          AREA ||i.ADC_AnalogWatchdogSingleChannelConfig||, CODE, READONLY, ALIGN=1

                  ADC_AnalogWatchdogSingleChannelConfig PROC
;;;1144     */
;;;1145   void ADC_AnalogWatchdogSingleChannelConfig(ADC_TypeDef* ADCx, uint8_t ADC_Channel)
000000  460a              MOV      r2,r1
;;;1146   {
;;;1147     uint32_t tmpreg = 0;
000002  2100              MOVS     r1,#0
;;;1148     /* Check the parameters */
;;;1149     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1150     assert_param(IS_ADC_CHANNEL(ADC_Channel));
;;;1151     /* Get the old register value */
;;;1152     tmpreg = ADCx->CR1;
000004  6841              LDR      r1,[r0,#4]
;;;1153     /* Clear the Analog watchdog channel select bits */
;;;1154     tmpreg &= CR1_AWDCH_Reset;
000006  f021011f          BIC      r1,r1,#0x1f
;;;1155     /* Set the Analog watchdog channel */
;;;1156     tmpreg |= ADC_Channel;
00000a  4311              ORRS     r1,r1,r2
;;;1157     /* Store the new register value */
;;;1158     ADCx->CR1 = tmpreg;
00000c  6041              STR      r1,[r0,#4]
;;;1159   }
00000e  4770              BX       lr
;;;1160   
                          ENDP


                          AREA ||i.ADC_AnalogWatchdogThresholdsConfig||, CODE, READONLY, ALIGN=1

                  ADC_AnalogWatchdogThresholdsConfig PROC
;;;1106     */
;;;1107   void ADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef* ADCx, uint16_t HighThreshold,
000000  6241              STR      r1,[r0,#0x24]
;;;1108                                           uint16_t LowThreshold)
;;;1109   {
;;;1110     /* Check the parameters */
;;;1111     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1112     assert_param(IS_ADC_THRESHOLD(HighThreshold));
;;;1113     assert_param(IS_ADC_THRESHOLD(LowThreshold));
;;;1114     /* Set the ADCx high threshold */
;;;1115     ADCx->HTR = HighThreshold;
;;;1116     /* Set the ADCx low threshold */
;;;1117     ADCx->LTR = LowThreshold;
000002  6282              STR      r2,[r0,#0x28]
;;;1118   }
000004  4770              BX       lr
;;;1119   
                          ENDP


                          AREA ||i.ADC_AutoInjectedConvCmd||, CODE, READONLY, ALIGN=1

                  ADC_AutoInjectedConvCmd PROC
;;;733      */
;;;734    void ADC_AutoInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L4.12|
;;;735    {
;;;736      /* Check the parameters */
;;;737      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;738      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;739      if (NewState != DISABLE)
;;;740      {
;;;741        /* Enable the selected ADC automatic injected group conversion */
;;;742        ADCx->CR1 |= CR1_JAUTO_Set;
000002  6842              LDR      r2,[r0,#4]
000004  f4426280          ORR      r2,r2,#0x400
000008  6042              STR      r2,[r0,#4]
00000a  e003              B        |L4.20|
                  |L4.12|
;;;743      }
;;;744      else
;;;745      {
;;;746        /* Disable the selected ADC automatic injected group conversion */
;;;747        ADCx->CR1 &= CR1_JAUTO_Reset;
00000c  6842              LDR      r2,[r0,#4]
00000e  f4226280          BIC      r2,r2,#0x400
000012  6042              STR      r2,[r0,#4]
                  |L4.20|
;;;748      }
;;;749    }
000014  4770              BX       lr
;;;750    
                          ENDP


                          AREA ||i.ADC_ClearFlag||, CODE, READONLY, ALIGN=1

                  ADC_ClearFlag PROC
;;;1227     */
;;;1228   void ADC_ClearFlag(ADC_TypeDef* ADCx, uint8_t ADC_FLAG)
000000  43ca              MVNS     r2,r1
;;;1229   {
;;;1230     /* Check the parameters */
;;;1231     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1232     assert_param(IS_ADC_CLEAR_FLAG(ADC_FLAG));
;;;1233     /* Clear the selected ADC flags */
;;;1234     ADCx->SR = ~(uint32_t)ADC_FLAG;
000002  6002              STR      r2,[r0,#0]
;;;1235   }
000004  4770              BX       lr
;;;1236   
                          ENDP


                          AREA ||i.ADC_ClearITPendingBit||, CODE, READONLY, ALIGN=1

                  ADC_ClearITPendingBit PROC
;;;1282     */
;;;1283   void ADC_ClearITPendingBit(ADC_TypeDef* ADCx, uint16_t ADC_IT)
000000  2200              MOVS     r2,#0
;;;1284   {
;;;1285     uint8_t itmask = 0;
;;;1286     /* Check the parameters */
;;;1287     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1288     assert_param(IS_ADC_IT(ADC_IT));
;;;1289     /* Get the ADC IT index */
;;;1290     itmask = (uint8_t)(ADC_IT >> 8);
000002  120a              ASRS     r2,r1,#8
;;;1291     /* Clear the selected ADC interrupt pending bits */
;;;1292     ADCx->SR = ~(uint32_t)itmask;
000004  43d3              MVNS     r3,r2
000006  6003              STR      r3,[r0,#0]
;;;1293   }
000008  4770              BX       lr
;;;1294   
                          ENDP


                          AREA ||i.ADC_Cmd||, CODE, READONLY, ALIGN=1

                  ADC_Cmd PROC
;;;298      */
;;;299    void ADC_Cmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L7.12|
;;;300    {
;;;301      /* Check the parameters */
;;;302      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;303      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;304      if (NewState != DISABLE)
;;;305      {
;;;306        /* Set the ADON bit to wake up the ADC from power down mode */
;;;307        ADCx->CR2 |= CR2_ADON_Set;
000002  6882              LDR      r2,[r0,#8]
000004  f0420201          ORR      r2,r2,#1
000008  6082              STR      r2,[r0,#8]
00000a  e003              B        |L7.20|
                  |L7.12|
;;;308      }
;;;309      else
;;;310      {
;;;311        /* Disable the selected ADC peripheral */
;;;312        ADCx->CR2 &= CR2_ADON_Reset;
00000c  6882              LDR      r2,[r0,#8]
00000e  f0220201          BIC      r2,r2,#1
000012  6082              STR      r2,[r0,#8]
                  |L7.20|
;;;313      }
;;;314    }
000014  4770              BX       lr
;;;315    
                          ENDP


                          AREA ||i.ADC_DMACmd||, CODE, READONLY, ALIGN=1

                  ADC_DMACmd PROC
;;;323      */
;;;324    void ADC_DMACmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L8.12|
;;;325    {
;;;326      /* Check the parameters */
;;;327      assert_param(IS_ADC_DMA_PERIPH(ADCx));
;;;328      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;329      if (NewState != DISABLE)
;;;330      {
;;;331        /* Enable the selected ADC DMA request */
;;;332        ADCx->CR2 |= CR2_DMA_Set;
000002  6882              LDR      r2,[r0,#8]
000004  f4427280          ORR      r2,r2,#0x100
000008  6082              STR      r2,[r0,#8]
00000a  e003              B        |L8.20|
                  |L8.12|
;;;333      }
;;;334      else
;;;335      {
;;;336        /* Disable the selected ADC DMA request */
;;;337        ADCx->CR2 &= CR2_DMA_Reset;
00000c  6882              LDR      r2,[r0,#8]
00000e  f4227280          BIC      r2,r2,#0x100
000012  6082              STR      r2,[r0,#8]
                  |L8.20|
;;;338      }
;;;339    }
000014  4770              BX       lr
;;;340    
                          ENDP


                          AREA ||i.ADC_DeInit||, CODE, READONLY, ALIGN=2

                  ADC_DeInit PROC
;;;178      */
;;;179    void ADC_DeInit(ADC_TypeDef* ADCx)
000000  b510              PUSH     {r4,lr}
;;;180    {
000002  4604              MOV      r4,r0
;;;181      /* Check the parameters */
;;;182      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;183      
;;;184      if (ADCx == ADC1)
000004  4812              LDR      r0,|L9.80|
000006  4284              CMP      r4,r0
000008  d108              BNE      |L9.28|
;;;185      {
;;;186        /* Enable ADC1 reset state */
;;;187        RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC1, ENABLE);
00000a  2101              MOVS     r1,#1
00000c  1540              ASRS     r0,r0,#21
00000e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;188        /* Release ADC1 from reset state */
;;;189        RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC1, DISABLE);
000012  2100              MOVS     r1,#0
000014  1560              ASRS     r0,r4,#21
000016  f7fffffe          BL       RCC_APB2PeriphResetCmd
00001a  e017              B        |L9.76|
                  |L9.28|
;;;190      }
;;;191      else if (ADCx == ADC2)
00001c  480d              LDR      r0,|L9.84|
00001e  4284              CMP      r4,r0
000020  d108              BNE      |L9.52|
;;;192      {
;;;193        /* Enable ADC2 reset state */
;;;194        RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC2, ENABLE);
000022  2101              MOVS     r1,#1
000024  1500              ASRS     r0,r0,#20
000026  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;195        /* Release ADC2 from reset state */
;;;196        RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC2, DISABLE);
00002a  2100              MOVS     r1,#0
00002c  1520              ASRS     r0,r4,#20
00002e  f7fffffe          BL       RCC_APB2PeriphResetCmd
000032  e00b              B        |L9.76|
                  |L9.52|
;;;197      }
;;;198      else
;;;199      {
;;;200        if (ADCx == ADC3)
000034  4808              LDR      r0,|L9.88|
000036  4284              CMP      r4,r0
000038  d108              BNE      |L9.76|
;;;201        {
;;;202          /* Enable ADC3 reset state */
;;;203          RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC3, ENABLE);
00003a  2101              MOVS     r1,#1
00003c  03c8              LSLS     r0,r1,#15
00003e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;204          /* Release ADC3 from reset state */
;;;205          RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC3, DISABLE);
000042  2100              MOVS     r1,#0
000044  f44f4000          MOV      r0,#0x8000
000048  f7fffffe          BL       RCC_APB2PeriphResetCmd
                  |L9.76|
;;;206        }
;;;207      }
;;;208    }
00004c  bd10              POP      {r4,pc}
;;;209    
                          ENDP

00004e  0000              DCW      0x0000
                  |L9.80|
                          DCD      0x40012400
                  |L9.84|
                          DCD      0x40012800
                  |L9.88|
                          DCD      0x40013c00

                          AREA ||i.ADC_DiscModeChannelCountConfig||, CODE, READONLY, ALIGN=1

                  ADC_DiscModeChannelCountConfig PROC
;;;508      */
;;;509    void ADC_DiscModeChannelCountConfig(ADC_TypeDef* ADCx, uint8_t Number)
000000  b510              PUSH     {r4,lr}
;;;510    {
000002  460a              MOV      r2,r1
;;;511      uint32_t tmpreg1 = 0;
000004  2100              MOVS     r1,#0
;;;512      uint32_t tmpreg2 = 0;
000006  2300              MOVS     r3,#0
;;;513      /* Check the parameters */
;;;514      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;515      assert_param(IS_ADC_REGULAR_DISC_NUMBER(Number));
;;;516      /* Get the old register value */
;;;517      tmpreg1 = ADCx->CR1;
000008  6841              LDR      r1,[r0,#4]
;;;518      /* Clear the old discontinuous mode channel count */
;;;519      tmpreg1 &= CR1_DISCNUM_Reset;
00000a  f4214160          BIC      r1,r1,#0xe000
;;;520      /* Set the discontinuous mode channel count */
;;;521      tmpreg2 = Number - 1;
00000e  1e53              SUBS     r3,r2,#1
;;;522      tmpreg1 |= tmpreg2 << 13;
000010  ea413143          ORR      r1,r1,r3,LSL #13
;;;523      /* Store the new register value */
;;;524      ADCx->CR1 = tmpreg1;
000014  6041              STR      r1,[r0,#4]
;;;525    }
000016  bd10              POP      {r4,pc}
;;;526    
                          ENDP


                          AREA ||i.ADC_DiscModeCmd||, CODE, READONLY, ALIGN=1

                  ADC_DiscModeCmd PROC
;;;535      */
;;;536    void ADC_DiscModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L11.12|
;;;537    {
;;;538      /* Check the parameters */
;;;539      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;540      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;541      if (NewState != DISABLE)
;;;542      {
;;;543        /* Enable the selected ADC regular discontinuous mode */
;;;544        ADCx->CR1 |= CR1_DISCEN_Set;
000002  6842              LDR      r2,[r0,#4]
000004  f4426200          ORR      r2,r2,#0x800
000008  6042              STR      r2,[r0,#4]
00000a  e003              B        |L11.20|
                  |L11.12|
;;;545      }
;;;546      else
;;;547      {
;;;548        /* Disable the selected ADC regular discontinuous mode */
;;;549        ADCx->CR1 &= CR1_DISCEN_Reset;
00000c  6842              LDR      r2,[r0,#4]
00000e  f4226200          BIC      r2,r2,#0x800
000012  6042              STR      r2,[r0,#4]
                  |L11.20|
;;;550      }
;;;551    }
000014  4770              BX       lr
;;;552    
                          ENDP


                          AREA ||i.ADC_ExternalTrigConvCmd||, CODE, READONLY, ALIGN=1

                  ADC_ExternalTrigConvCmd PROC
;;;685      */
;;;686    void ADC_ExternalTrigConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L12.12|
;;;687    {
;;;688      /* Check the parameters */
;;;689      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;690      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;691      if (NewState != DISABLE)
;;;692      {
;;;693        /* Enable the selected ADC conversion on external event */
;;;694        ADCx->CR2 |= CR2_EXTTRIG_Set;
000002  6882              LDR      r2,[r0,#8]
000004  f4421280          ORR      r2,r2,#0x100000
000008  6082              STR      r2,[r0,#8]
00000a  e003              B        |L12.20|
                  |L12.12|
;;;695      }
;;;696      else
;;;697      {
;;;698        /* Disable the selected ADC conversion on external event */
;;;699        ADCx->CR2 &= CR2_EXTTRIG_Reset;
00000c  6882              LDR      r2,[r0,#8]
00000e  f4221280          BIC      r2,r2,#0x100000
000012  6082              STR      r2,[r0,#8]
                  |L12.20|
;;;700      }
;;;701    }
000014  4770              BX       lr
;;;702    
                          ENDP


                          AREA ||i.ADC_ExternalTrigInjectedConvCmd||, CODE, READONLY, ALIGN=1

                  ADC_ExternalTrigInjectedConvCmd PROC
;;;823      */
;;;824    void ADC_ExternalTrigInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L13.12|
;;;825    {
;;;826      /* Check the parameters */
;;;827      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;828      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;829      if (NewState != DISABLE)
;;;830      {
;;;831        /* Enable the selected ADC external event selection for injected group */
;;;832        ADCx->CR2 |= CR2_JEXTTRIG_Set;
000002  6882              LDR      r2,[r0,#8]
000004  f4424200          ORR      r2,r2,#0x8000
000008  6082              STR      r2,[r0,#8]
00000a  e003              B        |L13.20|
                  |L13.12|
;;;833      }
;;;834      else
;;;835      {
;;;836        /* Disable the selected ADC external event selection for injected group */
;;;837        ADCx->CR2 &= CR2_JEXTTRIG_Reset;
00000c  6882              LDR      r2,[r0,#8]
00000e  f4224200          BIC      r2,r2,#0x8000
000012  6082              STR      r2,[r0,#8]
                  |L13.20|
;;;838      }
;;;839    }
000014  4770              BX       lr
;;;840    
                          ENDP


                          AREA ||i.ADC_ExternalTrigInjectedConvConfig||, CODE, READONLY, ALIGN=1

                  ADC_ExternalTrigInjectedConvConfig PROC
;;;798      */
;;;799    void ADC_ExternalTrigInjectedConvConfig(ADC_TypeDef* ADCx, uint32_t ADC_ExternalTrigInjecConv)
000000  460a              MOV      r2,r1
;;;800    {
;;;801      uint32_t tmpreg = 0;
000002  2100              MOVS     r1,#0
;;;802      /* Check the parameters */
;;;803      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;804      assert_param(IS_ADC_EXT_INJEC_TRIG(ADC_ExternalTrigInjecConv));
;;;805      /* Get the old register value */
;;;806      tmpreg = ADCx->CR2;
000004  6881              LDR      r1,[r0,#8]
;;;807      /* Clear the old external event selection for injected group */
;;;808      tmpreg &= CR2_JEXTSEL_Reset;
000006  f42141e0          BIC      r1,r1,#0x7000
;;;809      /* Set the external event selection for injected group */
;;;810      tmpreg |= ADC_ExternalTrigInjecConv;
00000a  4311              ORRS     r1,r1,r2
;;;811      /* Store the new register value */
;;;812      ADCx->CR2 = tmpreg;
00000c  6081              STR      r1,[r0,#8]
;;;813    }
00000e  4770              BX       lr
;;;814    
                          ENDP


                          AREA ||i.ADC_GetCalibrationStatus||, CODE, READONLY, ALIGN=1

                  ADC_GetCalibrationStatus PROC
;;;429      */
;;;430    FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx)
000000  4601              MOV      r1,r0
;;;431    {
;;;432      FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;433      /* Check the parameters */
;;;434      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;435      /* Check the status of CAL bit */
;;;436      if ((ADCx->CR2 & CR2_CAL_Set) != (uint32_t)RESET)
000004  688a              LDR      r2,[r1,#8]
000006  f0120f04          TST      r2,#4
00000a  d001              BEQ      |L15.16|
;;;437      {
;;;438        /* CAL bit is set: calibration on going */
;;;439        bitstatus = SET;
00000c  2001              MOVS     r0,#1
00000e  e000              B        |L15.18|
                  |L15.16|
;;;440      }
;;;441      else
;;;442      {
;;;443        /* CAL bit is reset: end of calibration */
;;;444        bitstatus = RESET;
000010  2000              MOVS     r0,#0
                  |L15.18|
;;;445      }
;;;446      /* Return the CAL bit status */
;;;447      return  bitstatus;
;;;448    }
000012  4770              BX       lr
;;;449    
                          ENDP


                          AREA ||i.ADC_GetConversionValue||, CODE, READONLY, ALIGN=1

                  ADC_GetConversionValue PROC
;;;707      */
;;;708    uint16_t ADC_GetConversionValue(ADC_TypeDef* ADCx)
000000  4601              MOV      r1,r0
;;;709    {
;;;710      /* Check the parameters */
;;;711      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;712      /* Return the selected ADC conversion value */
;;;713      return (uint16_t) ADCx->DR;
000002  6cc8              LDR      r0,[r1,#0x4c]
000004  b280              UXTH     r0,r0
;;;714    }
000006  4770              BX       lr
;;;715    
                          ENDP


                          AREA ||i.ADC_GetDualModeConversionValue||, CODE, READONLY, ALIGN=2

                  ADC_GetDualModeConversionValue PROC
;;;719      */
;;;720    uint32_t ADC_GetDualModeConversionValue(void)
000000  4801              LDR      r0,|L17.8|
;;;721    {
;;;722      /* Return the dual mode conversion value */
;;;723      return (*(__IO uint32_t *) DR_ADDRESS);
000002  6800              LDR      r0,[r0,#0]
;;;724    }
000004  4770              BX       lr
;;;725    
                          ENDP

000006  0000              DCW      0x0000
                  |L17.8|
                          DCD      0x4001244c

                          AREA ||i.ADC_GetFlagStatus||, CODE, READONLY, ALIGN=1

                  ADC_GetFlagStatus PROC
;;;1194     */
;;;1195   FlagStatus ADC_GetFlagStatus(ADC_TypeDef* ADCx, uint8_t ADC_FLAG)
000000  4602              MOV      r2,r0
;;;1196   {
;;;1197     FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;1198     /* Check the parameters */
;;;1199     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1200     assert_param(IS_ADC_GET_FLAG(ADC_FLAG));
;;;1201     /* Check the status of the specified ADC flag */
;;;1202     if ((ADCx->SR & ADC_FLAG) != (uint8_t)RESET)
000004  6813              LDR      r3,[r2,#0]
000006  420b              TST      r3,r1
000008  d001              BEQ      |L18.14|
;;;1203     {
;;;1204       /* ADC_FLAG is set */
;;;1205       bitstatus = SET;
00000a  2001              MOVS     r0,#1
00000c  e000              B        |L18.16|
                  |L18.14|
;;;1206     }
;;;1207     else
;;;1208     {
;;;1209       /* ADC_FLAG is reset */
;;;1210       bitstatus = RESET;
00000e  2000              MOVS     r0,#0
                  |L18.16|
;;;1211     }
;;;1212     /* Return the ADC_FLAG status */
;;;1213     return  bitstatus;
;;;1214   }
000010  4770              BX       lr
;;;1215   
                          ENDP


                          AREA ||i.ADC_GetITStatus||, CODE, READONLY, ALIGN=1

                  ADC_GetITStatus PROC
;;;1246     */
;;;1247   ITStatus ADC_GetITStatus(ADC_TypeDef* ADCx, uint16_t ADC_IT)
000000  b570              PUSH     {r4-r6,lr}
;;;1248   {
000002  4602              MOV      r2,r0
;;;1249     ITStatus bitstatus = RESET;
000004  2000              MOVS     r0,#0
;;;1250     uint32_t itmask = 0, enablestatus = 0;
000006  2300              MOVS     r3,#0
000008  2400              MOVS     r4,#0
;;;1251     /* Check the parameters */
;;;1252     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1253     assert_param(IS_ADC_GET_IT(ADC_IT));
;;;1254     /* Get the ADC IT index */
;;;1255     itmask = ADC_IT >> 8;
00000a  120b              ASRS     r3,r1,#8
;;;1256     /* Get the ADC_IT enable bit status */
;;;1257     enablestatus = (ADCx->CR1 & (uint8_t)ADC_IT) ;
00000c  6855              LDR      r5,[r2,#4]
00000e  b2ce              UXTB     r6,r1
000010  ea050406          AND      r4,r5,r6
;;;1258     /* Check the status of the specified ADC interrupt */
;;;1259     if (((ADCx->SR & itmask) != (uint32_t)RESET) && enablestatus)
000014  6815              LDR      r5,[r2,#0]
000016  421d              TST      r5,r3
000018  d002              BEQ      |L19.32|
00001a  b10c              CBZ      r4,|L19.32|
;;;1260     {
;;;1261       /* ADC_IT is set */
;;;1262       bitstatus = SET;
00001c  2001              MOVS     r0,#1
00001e  e000              B        |L19.34|
                  |L19.32|
;;;1263     }
;;;1264     else
;;;1265     {
;;;1266       /* ADC_IT is reset */
;;;1267       bitstatus = RESET;
000020  2000              MOVS     r0,#0
                  |L19.34|
;;;1268     }
;;;1269     /* Return the ADC_IT status */
;;;1270     return  bitstatus;
;;;1271   }
000022  bd70              POP      {r4-r6,pc}
;;;1272   
                          ENDP


                          AREA ||i.ADC_GetInjectedConversionValue||, CODE, READONLY, ALIGN=1

                  ADC_GetInjectedConversionValue PROC
;;;1051     */
;;;1052   uint16_t ADC_GetInjectedConversionValue(ADC_TypeDef* ADCx, uint8_t ADC_InjectedChannel)
000000  4602              MOV      r2,r0
;;;1053   {
;;;1054     __IO uint32_t tmp = 0;
000002  2300              MOVS     r3,#0
;;;1055     
;;;1056     /* Check the parameters */
;;;1057     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1058     assert_param(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));
;;;1059   
;;;1060     tmp = (uint32_t)ADCx;
000004  4613              MOV      r3,r2
;;;1061     tmp += ADC_InjectedChannel + JDR_Offset;
000006  f1010028          ADD      r0,r1,#0x28
00000a  4403              ADD      r3,r3,r0
;;;1062     
;;;1063     /* Returns the selected injected channel conversion data value */
;;;1064     return (uint16_t) (*(__IO uint32_t*)  tmp);   
00000c  6818              LDR      r0,[r3,#0]
00000e  b280              UXTH     r0,r0
;;;1065   }
000010  4770              BX       lr
;;;1066   
                          ENDP


                          AREA ||i.ADC_GetResetCalibrationStatus||, CODE, READONLY, ALIGN=1

                  ADC_GetResetCalibrationStatus PROC
;;;391      */
;;;392    FlagStatus ADC_GetResetCalibrationStatus(ADC_TypeDef* ADCx)
000000  4601              MOV      r1,r0
;;;393    {
;;;394      FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;395      /* Check the parameters */
;;;396      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;397      /* Check the status of RSTCAL bit */
;;;398      if ((ADCx->CR2 & CR2_RSTCAL_Set) != (uint32_t)RESET)
000004  688a              LDR      r2,[r1,#8]
000006  f0120f08          TST      r2,#8
00000a  d001              BEQ      |L21.16|
;;;399      {
;;;400        /* RSTCAL bit is set */
;;;401        bitstatus = SET;
00000c  2001              MOVS     r0,#1
00000e  e000              B        |L21.18|
                  |L21.16|
;;;402      }
;;;403      else
;;;404      {
;;;405        /* RSTCAL bit is reset */
;;;406        bitstatus = RESET;
000010  2000              MOVS     r0,#0
                  |L21.18|
;;;407      }
;;;408      /* Return the RSTCAL bit status */
;;;409      return  bitstatus;
;;;410    }
000012  4770              BX       lr
;;;411    
                          ENDP


                          AREA ||i.ADC_GetSoftwareStartConvStatus||, CODE, READONLY, ALIGN=1

                  ADC_GetSoftwareStartConvStatus PROC
;;;480      */
;;;481    FlagStatus ADC_GetSoftwareStartConvStatus(ADC_TypeDef* ADCx)
000000  4601              MOV      r1,r0
;;;482    {
;;;483      FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;484      /* Check the parameters */
;;;485      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;486      /* Check the status of SWSTART bit */
;;;487      if ((ADCx->CR2 & CR2_SWSTART_Set) != (uint32_t)RESET)
000004  688a              LDR      r2,[r1,#8]
000006  f4120f80          TST      r2,#0x400000
00000a  d001              BEQ      |L22.16|
;;;488      {
;;;489        /* SWSTART bit is set */
;;;490        bitstatus = SET;
00000c  2001              MOVS     r0,#1
00000e  e000              B        |L22.18|
                  |L22.16|
;;;491      }
;;;492      else
;;;493      {
;;;494        /* SWSTART bit is reset */
;;;495        bitstatus = RESET;
000010  2000              MOVS     r0,#0
                  |L22.18|
;;;496      }
;;;497      /* Return the SWSTART bit status */
;;;498      return  bitstatus;
;;;499    }
000012  4770              BX       lr
;;;500    
                          ENDP


                          AREA ||i.ADC_GetSoftwareStartInjectedConvCmdStatus||, CODE, READONLY, ALIGN=1

                  ADC_GetSoftwareStartInjectedConvCmdStatus PROC
;;;872      */
;;;873    FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus(ADC_TypeDef* ADCx)
000000  4601              MOV      r1,r0
;;;874    {
;;;875      FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;876      /* Check the parameters */
;;;877      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;878      /* Check the status of JSWSTART bit */
;;;879      if ((ADCx->CR2 & CR2_JSWSTART_Set) != (uint32_t)RESET)
000004  688a              LDR      r2,[r1,#8]
000006  f4121f00          TST      r2,#0x200000
00000a  d001              BEQ      |L23.16|
;;;880      {
;;;881        /* JSWSTART bit is set */
;;;882        bitstatus = SET;
00000c  2001              MOVS     r0,#1
00000e  e000              B        |L23.18|
                  |L23.16|
;;;883      }
;;;884      else
;;;885      {
;;;886        /* JSWSTART bit is reset */
;;;887        bitstatus = RESET;
000010  2000              MOVS     r0,#0
                  |L23.18|
;;;888      }
;;;889      /* Return the JSWSTART bit status */
;;;890      return  bitstatus;
;;;891    }
000012  4770              BX       lr
;;;892    
                          ENDP


                          AREA ||i.ADC_ITConfig||, CODE, READONLY, ALIGN=1

                  ADC_ITConfig PROC
;;;352      */
;;;353    void ADC_ITConfig(ADC_TypeDef* ADCx, uint16_t ADC_IT, FunctionalState NewState)
000000  b510              PUSH     {r4,lr}
;;;354    {
;;;355      uint8_t itmask = 0;
000002  2300              MOVS     r3,#0
;;;356      /* Check the parameters */
;;;357      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;358      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;359      assert_param(IS_ADC_IT(ADC_IT));
;;;360      /* Get the ADC IT index */
;;;361      itmask = (uint8_t)ADC_IT;
000004  b2cb              UXTB     r3,r1
;;;362      if (NewState != DISABLE)
000006  b11a              CBZ      r2,|L24.16|
;;;363      {
;;;364        /* Enable the selected ADC interrupts */
;;;365        ADCx->CR1 |= itmask;
000008  6844              LDR      r4,[r0,#4]
00000a  431c              ORRS     r4,r4,r3
00000c  6044              STR      r4,[r0,#4]
00000e  e002              B        |L24.22|
                  |L24.16|
;;;366      }
;;;367      else
;;;368      {
;;;369        /* Disable the selected ADC interrupts */
;;;370        ADCx->CR1 &= (~(uint32_t)itmask);
000010  6844              LDR      r4,[r0,#4]
000012  439c              BICS     r4,r4,r3
000014  6044              STR      r4,[r0,#4]
                  |L24.22|
;;;371      }
;;;372    }
000016  bd10              POP      {r4,pc}
;;;373    
                          ENDP


                          AREA ||i.ADC_Init||, CODE, READONLY, ALIGN=2

                  ADC_Init PROC
;;;217      */
;;;218    void ADC_Init(ADC_TypeDef* ADCx, ADC_InitTypeDef* ADC_InitStruct)
000000  b530              PUSH     {r4,r5,lr}
;;;219    {
000002  4602              MOV      r2,r0
;;;220      uint32_t tmpreg1 = 0;
000004  2000              MOVS     r0,#0
;;;221      uint8_t tmpreg2 = 0;
000006  2300              MOVS     r3,#0
;;;222      /* Check the parameters */
;;;223      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;224      assert_param(IS_ADC_MODE(ADC_InitStruct->ADC_Mode));
;;;225      assert_param(IS_FUNCTIONAL_STATE(ADC_InitStruct->ADC_ScanConvMode));
;;;226      assert_param(IS_FUNCTIONAL_STATE(ADC_InitStruct->ADC_ContinuousConvMode));
;;;227      assert_param(IS_ADC_EXT_TRIG(ADC_InitStruct->ADC_ExternalTrigConv));   
;;;228      assert_param(IS_ADC_DATA_ALIGN(ADC_InitStruct->ADC_DataAlign)); 
;;;229      assert_param(IS_ADC_REGULAR_LENGTH(ADC_InitStruct->ADC_NbrOfChannel));
;;;230    
;;;231      /*---------------------------- ADCx CR1 Configuration -----------------*/
;;;232      /* Get the ADCx CR1 value */
;;;233      tmpreg1 = ADCx->CR1;
000008  6850              LDR      r0,[r2,#4]
;;;234      /* Clear DUALMOD and SCAN bits */
;;;235      tmpreg1 &= CR1_CLEAR_Mask;
00000a  4c0f              LDR      r4,|L25.72|
00000c  4020              ANDS     r0,r0,r4
;;;236      /* Configure ADCx: Dual mode and scan conversion mode */
;;;237      /* Set DUALMOD bits according to ADC_Mode value */
;;;238      /* Set SCAN bit according to ADC_ScanConvMode value */
;;;239      tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_Mode | ((uint32_t)ADC_InitStruct->ADC_ScanConvMode << 8));
00000e  790d              LDRB     r5,[r1,#4]
000010  680c              LDR      r4,[r1,#0]
000012  ea442405          ORR      r4,r4,r5,LSL #8
000016  4320              ORRS     r0,r0,r4
;;;240      /* Write to ADCx CR1 */
;;;241      ADCx->CR1 = tmpreg1;
000018  6050              STR      r0,[r2,#4]
;;;242    
;;;243      /*---------------------------- ADCx CR2 Configuration -----------------*/
;;;244      /* Get the ADCx CR2 value */
;;;245      tmpreg1 = ADCx->CR2;
00001a  6890              LDR      r0,[r2,#8]
;;;246      /* Clear CONT, ALIGN and EXTSEL bits */
;;;247      tmpreg1 &= CR2_CLEAR_Mask;
00001c  4c0b              LDR      r4,|L25.76|
00001e  4020              ANDS     r0,r0,r4
;;;248      /* Configure ADCx: external trigger event and continuous conversion mode */
;;;249      /* Set ALIGN bit according to ADC_DataAlign value */
;;;250      /* Set EXTSEL bits according to ADC_ExternalTrigConv value */
;;;251      /* Set CONT bit according to ADC_ContinuousConvMode value */
;;;252      tmpreg1 |= (uint32_t)(ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ExternalTrigConv |
000020  e9d15402          LDRD     r5,r4,[r1,#8]
000024  432c              ORRS     r4,r4,r5
000026  794d              LDRB     r5,[r1,#5]
000028  ea440445          ORR      r4,r4,r5,LSL #1
00002c  4320              ORRS     r0,r0,r4
;;;253                ((uint32_t)ADC_InitStruct->ADC_ContinuousConvMode << 1));
;;;254      /* Write to ADCx CR2 */
;;;255      ADCx->CR2 = tmpreg1;
00002e  6090              STR      r0,[r2,#8]
;;;256    
;;;257      /*---------------------------- ADCx SQR1 Configuration -----------------*/
;;;258      /* Get the ADCx SQR1 value */
;;;259      tmpreg1 = ADCx->SQR1;
000030  6ad0              LDR      r0,[r2,#0x2c]
;;;260      /* Clear L bits */
;;;261      tmpreg1 &= SQR1_CLEAR_Mask;
000032  f4200070          BIC      r0,r0,#0xf00000
;;;262      /* Configure ADCx: regular channel sequence length */
;;;263      /* Set L bits according to ADC_NbrOfChannel value */
;;;264      tmpreg2 |= (uint8_t) (ADC_InitStruct->ADC_NbrOfChannel - (uint8_t)1);
000036  7c0c              LDRB     r4,[r1,#0x10]
000038  1e64              SUBS     r4,r4,#1
00003a  b2e4              UXTB     r4,r4
00003c  4323              ORRS     r3,r3,r4
;;;265      tmpreg1 |= (uint32_t)tmpreg2 << 20;
00003e  ea405003          ORR      r0,r0,r3,LSL #20
;;;266      /* Write to ADCx SQR1 */
;;;267      ADCx->SQR1 = tmpreg1;
000042  62d0              STR      r0,[r2,#0x2c]
;;;268    }
000044  bd30              POP      {r4,r5,pc}
;;;269    
                          ENDP

000046  0000              DCW      0x0000
                  |L25.72|
                          DCD      0xfff0feff
                  |L25.76|
                          DCD      0xfff1f7fd

                          AREA ||i.ADC_InjectedChannelConfig||, CODE, READONLY, ALIGN=1

                  ADC_InjectedChannelConfig PROC
;;;929      */
;;;930    void ADC_InjectedChannelConfig(ADC_TypeDef* ADCx, uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime)
000000  b5f0              PUSH     {r4-r7,lr}
;;;931    {
000002  4604              MOV      r4,r0
000004  4615              MOV      r5,r2
;;;932      uint32_t tmpreg1 = 0, tmpreg2 = 0, tmpreg3 = 0;
000006  2000              MOVS     r0,#0
000008  2200              MOVS     r2,#0
00000a  2600              MOVS     r6,#0
;;;933      /* Check the parameters */
;;;934      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;935      assert_param(IS_ADC_CHANNEL(ADC_Channel));
;;;936      assert_param(IS_ADC_INJECTED_RANK(Rank));
;;;937      assert_param(IS_ADC_SAMPLE_TIME(ADC_SampleTime));
;;;938      /* if ADC_Channel_10 ... ADC_Channel_17 is selected */
;;;939      if (ADC_Channel > ADC_Channel_9)
00000c  2909              CMP      r1,#9
00000e  dd11              BLE      |L26.52|
;;;940      {
;;;941        /* Get the old register value */
;;;942        tmpreg1 = ADCx->SMPR1;
000010  68e0              LDR      r0,[r4,#0xc]
;;;943        /* Calculate the mask to clear */
;;;944        tmpreg2 = SMPR1_SMP_Set << (3*(ADC_Channel - 10));
000012  f1a1070a          SUB      r7,r1,#0xa
000016  eb070c47          ADD      r12,r7,r7,LSL #1
00001a  2707              MOVS     r7,#7
00001c  fa07f20c          LSL      r2,r7,r12
;;;945        /* Clear the old channel sample time */
;;;946        tmpreg1 &= ~tmpreg2;
000020  4390              BICS     r0,r0,r2
;;;947        /* Calculate the mask to set */
;;;948        tmpreg2 = (uint32_t)ADC_SampleTime << (3*(ADC_Channel - 10));
000022  f1a1070a          SUB      r7,r1,#0xa
000026  eb070747          ADD      r7,r7,r7,LSL #1
00002a  fa03f207          LSL      r2,r3,r7
;;;949        /* Set the new channel sample time */
;;;950        tmpreg1 |= tmpreg2;
00002e  4310              ORRS     r0,r0,r2
;;;951        /* Store the new register value */
;;;952        ADCx->SMPR1 = tmpreg1;
000030  60e0              STR      r0,[r4,#0xc]
000032  e00c              B        |L26.78|
                  |L26.52|
;;;953      }
;;;954      else /* ADC_Channel include in ADC_Channel_[0..9] */
;;;955      {
;;;956        /* Get the old register value */
;;;957        tmpreg1 = ADCx->SMPR2;
000034  6920              LDR      r0,[r4,#0x10]
;;;958        /* Calculate the mask to clear */
;;;959        tmpreg2 = SMPR2_SMP_Set << (3 * ADC_Channel);
000036  eb010c41          ADD      r12,r1,r1,LSL #1
00003a  2707              MOVS     r7,#7
00003c  fa07f20c          LSL      r2,r7,r12
;;;960        /* Clear the old channel sample time */
;;;961        tmpreg1 &= ~tmpreg2;
000040  4390              BICS     r0,r0,r2
;;;962        /* Calculate the mask to set */
;;;963        tmpreg2 = (uint32_t)ADC_SampleTime << (3 * ADC_Channel);
000042  eb010741          ADD      r7,r1,r1,LSL #1
000046  fa03f207          LSL      r2,r3,r7
;;;964        /* Set the new channel sample time */
;;;965        tmpreg1 |= tmpreg2;
00004a  4310              ORRS     r0,r0,r2
;;;966        /* Store the new register value */
;;;967        ADCx->SMPR2 = tmpreg1;
00004c  6120              STR      r0,[r4,#0x10]
                  |L26.78|
;;;968      }
;;;969      /* Rank configuration */
;;;970      /* Get the old register value */
;;;971      tmpreg1 = ADCx->JSQR;
00004e  6ba0              LDR      r0,[r4,#0x38]
;;;972      /* Get JL value: Number = JL+1 */
;;;973      tmpreg3 =  (tmpreg1 & JSQR_JL_Set)>> 20;
000050  f3c05601          UBFX     r6,r0,#20,#2
;;;974      /* Calculate the mask to clear: ((Rank-1)+(4-JL-1)) */
;;;975      tmpreg2 = JSQR_JSQ_Set << (5 * (uint8_t)((Rank + 3) - (tmpreg3 + 1)));
000054  1cef              ADDS     r7,r5,#3
000056  f1060c01          ADD      r12,r6,#1
00005a  eba7070c          SUB      r7,r7,r12
00005e  eb070c87          ADD      r12,r7,r7,LSL #2
000062  271f              MOVS     r7,#0x1f
000064  fa07f20c          LSL      r2,r7,r12
;;;976      /* Clear the old JSQx bits for the selected rank */
;;;977      tmpreg1 &= ~tmpreg2;
000068  4390              BICS     r0,r0,r2
;;;978      /* Calculate the mask to set: ((Rank-1)+(4-JL-1)) */
;;;979      tmpreg2 = (uint32_t)ADC_Channel << (5 * (uint8_t)((Rank + 3) - (tmpreg3 + 1)));
00006a  1cef              ADDS     r7,r5,#3
00006c  f1060c01          ADD      r12,r6,#1
000070  eba7070c          SUB      r7,r7,r12
000074  eb070787          ADD      r7,r7,r7,LSL #2
000078  fa01f207          LSL      r2,r1,r7
;;;980      /* Set the JSQx bits for the selected rank */
;;;981      tmpreg1 |= tmpreg2;
00007c  4310              ORRS     r0,r0,r2
;;;982      /* Store the new register value */
;;;983      ADCx->JSQR = tmpreg1;
00007e  63a0              STR      r0,[r4,#0x38]
;;;984    }
000080  bdf0              POP      {r4-r7,pc}
;;;985    
                          ENDP


                          AREA ||i.ADC_InjectedDiscModeCmd||, CODE, READONLY, ALIGN=1

                  ADC_InjectedDiscModeCmd PROC
;;;759      */
;;;760    void ADC_InjectedDiscModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L27.12|
;;;761    {
;;;762      /* Check the parameters */
;;;763      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;764      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;765      if (NewState != DISABLE)
;;;766      {
;;;767        /* Enable the selected ADC injected discontinuous mode */
;;;768        ADCx->CR1 |= CR1_JDISCEN_Set;
000002  6842              LDR      r2,[r0,#4]
000004  f4425280          ORR      r2,r2,#0x1000
000008  6042              STR      r2,[r0,#4]
00000a  e003              B        |L27.20|
                  |L27.12|
;;;769      }
;;;770      else
;;;771      {
;;;772        /* Disable the selected ADC injected discontinuous mode */
;;;773        ADCx->CR1 &= CR1_JDISCEN_Reset;
00000c  6842              LDR      r2,[r0,#4]
00000e  f4225280          BIC      r2,r2,#0x1000
000012  6042              STR      r2,[r0,#4]
                  |L27.20|
;;;774      }
;;;775    }
000014  4770              BX       lr
;;;776    
                          ENDP


                          AREA ||i.ADC_InjectedSequencerLengthConfig||, CODE, READONLY, ALIGN=1

                  ADC_InjectedSequencerLengthConfig PROC
;;;992      */
;;;993    void ADC_InjectedSequencerLengthConfig(ADC_TypeDef* ADCx, uint8_t Length)
000000  b510              PUSH     {r4,lr}
;;;994    {
000002  460a              MOV      r2,r1
;;;995      uint32_t tmpreg1 = 0;
000004  2100              MOVS     r1,#0
;;;996      uint32_t tmpreg2 = 0;
000006  2300              MOVS     r3,#0
;;;997      /* Check the parameters */
;;;998      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;999      assert_param(IS_ADC_INJECTED_LENGTH(Length));
;;;1000     
;;;1001     /* Get the old register value */
;;;1002     tmpreg1 = ADCx->JSQR;
000008  6b81              LDR      r1,[r0,#0x38]
;;;1003     /* Clear the old injected sequnence lenght JL bits */
;;;1004     tmpreg1 &= JSQR_JL_Reset;
00000a  f4211140          BIC      r1,r1,#0x300000
;;;1005     /* Set the injected sequnence lenght JL bits */
;;;1006     tmpreg2 = Length - 1; 
00000e  1e53              SUBS     r3,r2,#1
;;;1007     tmpreg1 |= tmpreg2 << 20;
000010  ea415103          ORR      r1,r1,r3,LSL #20
;;;1008     /* Store the new register value */
;;;1009     ADCx->JSQR = tmpreg1;
000014  6381              STR      r1,[r0,#0x38]
;;;1010   }
000016  bd10              POP      {r4,pc}
;;;1011   
                          ENDP


                          AREA ||i.ADC_RegularChannelConfig||, CODE, READONLY, ALIGN=1

                  ADC_RegularChannelConfig PROC
;;;589      */
;;;590    void ADC_RegularChannelConfig(ADC_TypeDef* ADCx, uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime)
000000  b5f0              PUSH     {r4-r7,lr}
;;;591    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;592      uint32_t tmpreg1 = 0, tmpreg2 = 0;
000006  2000              MOVS     r0,#0
000008  2100              MOVS     r1,#0
;;;593      /* Check the parameters */
;;;594      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;595      assert_param(IS_ADC_CHANNEL(ADC_Channel));
;;;596      assert_param(IS_ADC_REGULAR_RANK(Rank));
;;;597      assert_param(IS_ADC_SAMPLE_TIME(ADC_SampleTime));
;;;598      /* if ADC_Channel_10 ... ADC_Channel_17 is selected */
;;;599      if (ADC_Channel > ADC_Channel_9)
00000a  2d09              CMP      r5,#9
00000c  dd11              BLE      |L29.50|
;;;600      {
;;;601        /* Get the old register value */
;;;602        tmpreg1 = ADCx->SMPR1;
00000e  68e0              LDR      r0,[r4,#0xc]
;;;603        /* Calculate the mask to clear */
;;;604        tmpreg2 = SMPR1_SMP_Set << (3 * (ADC_Channel - 10));
000010  f1a5060a          SUB      r6,r5,#0xa
000014  eb060746          ADD      r7,r6,r6,LSL #1
000018  2607              MOVS     r6,#7
00001a  fa06f107          LSL      r1,r6,r7
;;;605        /* Clear the old channel sample time */
;;;606        tmpreg1 &= ~tmpreg2;
00001e  4388              BICS     r0,r0,r1
;;;607        /* Calculate the mask to set */
;;;608        tmpreg2 = (uint32_t)ADC_SampleTime << (3 * (ADC_Channel - 10));
000020  f1a5060a          SUB      r6,r5,#0xa
000024  eb060646          ADD      r6,r6,r6,LSL #1
000028  fa03f106          LSL      r1,r3,r6
;;;609        /* Set the new channel sample time */
;;;610        tmpreg1 |= tmpreg2;
00002c  4308              ORRS     r0,r0,r1
;;;611        /* Store the new register value */
;;;612        ADCx->SMPR1 = tmpreg1;
00002e  60e0              STR      r0,[r4,#0xc]
000030  e00c              B        |L29.76|
                  |L29.50|
;;;613      }
;;;614      else /* ADC_Channel include in ADC_Channel_[0..9] */
;;;615      {
;;;616        /* Get the old register value */
;;;617        tmpreg1 = ADCx->SMPR2;
000032  6920              LDR      r0,[r4,#0x10]
;;;618        /* Calculate the mask to clear */
;;;619        tmpreg2 = SMPR2_SMP_Set << (3 * ADC_Channel);
000034  eb050745          ADD      r7,r5,r5,LSL #1
000038  2607              MOVS     r6,#7
00003a  fa06f107          LSL      r1,r6,r7
;;;620        /* Clear the old channel sample time */
;;;621        tmpreg1 &= ~tmpreg2;
00003e  4388              BICS     r0,r0,r1
;;;622        /* Calculate the mask to set */
;;;623        tmpreg2 = (uint32_t)ADC_SampleTime << (3 * ADC_Channel);
000040  eb050645          ADD      r6,r5,r5,LSL #1
000044  fa03f106          LSL      r1,r3,r6
;;;624        /* Set the new channel sample time */
;;;625        tmpreg1 |= tmpreg2;
000048  4308              ORRS     r0,r0,r1
;;;626        /* Store the new register value */
;;;627        ADCx->SMPR2 = tmpreg1;
00004a  6120              STR      r0,[r4,#0x10]
                  |L29.76|
;;;628      }
;;;629      /* For Rank 1 to 6 */
;;;630      if (Rank < 7)
00004c  2a07              CMP      r2,#7
00004e  da0f              BGE      |L29.112|
;;;631      {
;;;632        /* Get the old register value */
;;;633        tmpreg1 = ADCx->SQR3;
000050  6b60              LDR      r0,[r4,#0x34]
;;;634        /* Calculate the mask to clear */
;;;635        tmpreg2 = SQR3_SQ_Set << (5 * (Rank - 1));
000052  1e56              SUBS     r6,r2,#1
000054  eb060786          ADD      r7,r6,r6,LSL #2
000058  261f              MOVS     r6,#0x1f
00005a  fa06f107          LSL      r1,r6,r7
;;;636        /* Clear the old SQx bits for the selected rank */
;;;637        tmpreg1 &= ~tmpreg2;
00005e  4388              BICS     r0,r0,r1
;;;638        /* Calculate the mask to set */
;;;639        tmpreg2 = (uint32_t)ADC_Channel << (5 * (Rank - 1));
000060  1e56              SUBS     r6,r2,#1
000062  eb060686          ADD      r6,r6,r6,LSL #2
000066  fa05f106          LSL      r1,r5,r6
;;;640        /* Set the SQx bits for the selected rank */
;;;641        tmpreg1 |= tmpreg2;
00006a  4308              ORRS     r0,r0,r1
;;;642        /* Store the new register value */
;;;643        ADCx->SQR3 = tmpreg1;
00006c  6360              STR      r0,[r4,#0x34]
00006e  e022              B        |L29.182|
                  |L29.112|
;;;644      }
;;;645      /* For Rank 7 to 12 */
;;;646      else if (Rank < 13)
000070  2a0d              CMP      r2,#0xd
000072  da0f              BGE      |L29.148|
;;;647      {
;;;648        /* Get the old register value */
;;;649        tmpreg1 = ADCx->SQR2;
000074  6b20              LDR      r0,[r4,#0x30]
;;;650        /* Calculate the mask to clear */
;;;651        tmpreg2 = SQR2_SQ_Set << (5 * (Rank - 7));
000076  1fd6              SUBS     r6,r2,#7
000078  eb060786          ADD      r7,r6,r6,LSL #2
00007c  261f              MOVS     r6,#0x1f
00007e  fa06f107          LSL      r1,r6,r7
;;;652        /* Clear the old SQx bits for the selected rank */
;;;653        tmpreg1 &= ~tmpreg2;
000082  4388              BICS     r0,r0,r1
;;;654        /* Calculate the mask to set */
;;;655        tmpreg2 = (uint32_t)ADC_Channel << (5 * (Rank - 7));
000084  1fd6              SUBS     r6,r2,#7
000086  eb060686          ADD      r6,r6,r6,LSL #2
00008a  fa05f106          LSL      r1,r5,r6
;;;656        /* Set the SQx bits for the selected rank */
;;;657        tmpreg1 |= tmpreg2;
00008e  4308              ORRS     r0,r0,r1
;;;658        /* Store the new register value */
;;;659        ADCx->SQR2 = tmpreg1;
000090  6320              STR      r0,[r4,#0x30]
000092  e010              B        |L29.182|
                  |L29.148|
;;;660      }
;;;661      /* For Rank 13 to 16 */
;;;662      else
;;;663      {
;;;664        /* Get the old register value */
;;;665        tmpreg1 = ADCx->SQR1;
000094  6ae0              LDR      r0,[r4,#0x2c]
;;;666        /* Calculate the mask to clear */
;;;667        tmpreg2 = SQR1_SQ_Set << (5 * (Rank - 13));
000096  f1a2060d          SUB      r6,r2,#0xd
00009a  eb060786          ADD      r7,r6,r6,LSL #2
00009e  261f              MOVS     r6,#0x1f
0000a0  fa06f107          LSL      r1,r6,r7
;;;668        /* Clear the old SQx bits for the selected rank */
;;;669        tmpreg1 &= ~tmpreg2;
0000a4  4388              BICS     r0,r0,r1
;;;670        /* Calculate the mask to set */
;;;671        tmpreg2 = (uint32_t)ADC_Channel << (5 * (Rank - 13));
0000a6  f1a2060d          SUB      r6,r2,#0xd
0000aa  eb060686          ADD      r6,r6,r6,LSL #2
0000ae  fa05f106          LSL      r1,r5,r6
;;;672        /* Set the SQx bits for the selected rank */
;;;673        tmpreg1 |= tmpreg2;
0000b2  4308              ORRS     r0,r0,r1
;;;674        /* Store the new register value */
;;;675        ADCx->SQR1 = tmpreg1;
0000b4  62e0              STR      r0,[r4,#0x2c]
                  |L29.182|
;;;676      }
;;;677    }
0000b6  bdf0              POP      {r4-r7,pc}
;;;678    
                          ENDP


                          AREA ||i.ADC_ResetCalibration||, CODE, READONLY, ALIGN=1

                  ADC_ResetCalibration PROC
;;;378      */
;;;379    void ADC_ResetCalibration(ADC_TypeDef* ADCx)
000000  6881              LDR      r1,[r0,#8]
;;;380    {
;;;381      /* Check the parameters */
;;;382      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;383      /* Resets the selected ADC calibration registers */  
;;;384      ADCx->CR2 |= CR2_RSTCAL_Set;
000002  f0410108          ORR      r1,r1,#8
000006  6081              STR      r1,[r0,#8]
;;;385    }
000008  4770              BX       lr
;;;386    
                          ENDP


                          AREA ||i.ADC_SetInjectedOffset||, CODE, READONLY, ALIGN=1

                  ADC_SetInjectedOffset PROC
;;;1024     */
;;;1025   void ADC_SetInjectedOffset(ADC_TypeDef* ADCx, uint8_t ADC_InjectedChannel, uint16_t Offset)
000000  b510              PUSH     {r4,lr}
;;;1026   {
;;;1027     __IO uint32_t tmp = 0;
000002  2300              MOVS     r3,#0
;;;1028     
;;;1029     /* Check the parameters */
;;;1030     assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1031     assert_param(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));
;;;1032     assert_param(IS_ADC_OFFSET(Offset));  
;;;1033     
;;;1034     tmp = (uint32_t)ADCx;
000004  4603              MOV      r3,r0
;;;1035     tmp += ADC_InjectedChannel;
000006  440b              ADD      r3,r3,r1
;;;1036     
;;;1037     /* Set the selected injected channel data offset */
;;;1038     *(__IO uint32_t *) tmp = (uint32_t)Offset;
000008  601a              STR      r2,[r3,#0]
;;;1039   }
00000a  bd10              POP      {r4,pc}
;;;1040   
                          ENDP


                          AREA ||i.ADC_SoftwareStartConvCmd||, CODE, READONLY, ALIGN=1

                  ADC_SoftwareStartConvCmd PROC
;;;456      */
;;;457    void ADC_SoftwareStartConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L32.12|
;;;458    {
;;;459      /* Check the parameters */
;;;460      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;461      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;462      if (NewState != DISABLE)
;;;463      {
;;;464        /* Enable the selected ADC conversion on external event and start the selected
;;;465           ADC conversion */
;;;466        ADCx->CR2 |= CR2_EXTTRIG_SWSTART_Set;
000002  6882              LDR      r2,[r0,#8]
000004  f44202a0          ORR      r2,r2,#0x500000
000008  6082              STR      r2,[r0,#8]
00000a  e003              B        |L32.20|
                  |L32.12|
;;;467      }
;;;468      else
;;;469      {
;;;470        /* Disable the selected ADC conversion on external event and stop the selected
;;;471           ADC conversion */
;;;472        ADCx->CR2 &= CR2_EXTTRIG_SWSTART_Reset;
00000c  6882              LDR      r2,[r0,#8]
00000e  f42202a0          BIC      r2,r2,#0x500000
000012  6082              STR      r2,[r0,#8]
                  |L32.20|
;;;473      }
;;;474    }
000014  4770              BX       lr
;;;475    
                          ENDP


                          AREA ||i.ADC_SoftwareStartInjectedConvCmd||, CODE, READONLY, ALIGN=1

                  ADC_SoftwareStartInjectedConvCmd PROC
;;;848      */
;;;849    void ADC_SoftwareStartInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000  b121              CBZ      r1,|L33.12|
;;;850    {
;;;851      /* Check the parameters */
;;;852      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;853      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;854      if (NewState != DISABLE)
;;;855      {
;;;856        /* Enable the selected ADC conversion for injected group on external event and start the selected
;;;857           ADC injected conversion */
;;;858        ADCx->CR2 |= CR2_JEXTTRIG_JSWSTART_Set;
000002  6882              LDR      r2,[r0,#8]
000004  f4421202          ORR      r2,r2,#0x208000
000008  6082              STR      r2,[r0,#8]
00000a  e003              B        |L33.20|
                  |L33.12|
;;;859      }
;;;860      else
;;;861      {
;;;862        /* Disable the selected ADC conversion on external event for injected group and stop the selected
;;;863           ADC injected conversion */
;;;864        ADCx->CR2 &= CR2_JEXTTRIG_JSWSTART_Reset;
00000c  6882              LDR      r2,[r0,#8]
00000e  f4221202          BIC      r2,r2,#0x208000
000012  6082              STR      r2,[r0,#8]
                  |L33.20|
;;;865      }
;;;866    }
000014  4770              BX       lr
;;;867    
                          ENDP


                          AREA ||i.ADC_StartCalibration||, CODE, READONLY, ALIGN=1

                  ADC_StartCalibration PROC
;;;416      */
;;;417    void ADC_StartCalibration(ADC_TypeDef* ADCx)
000000  6881              LDR      r1,[r0,#8]
;;;418    {
;;;419      /* Check the parameters */
;;;420      assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;421      /* Enable the selected ADC calibration process */  
;;;422      ADCx->CR2 |= CR2_CAL_Set;
000002  f0410104          ORR      r1,r1,#4
000006  6081              STR      r1,[r0,#8]
;;;423    }
000008  4770              BX       lr
;;;424    
                          ENDP


                          AREA ||i.ADC_StructInit||, CODE, READONLY, ALIGN=1

                  ADC_StructInit PROC
;;;274      */
;;;275    void ADC_StructInit(ADC_InitTypeDef* ADC_InitStruct)
000000  2100              MOVS     r1,#0
;;;276    {
;;;277      /* Reset ADC init structure parameters values */
;;;278      /* Initialize the ADC_Mode member */
;;;279      ADC_InitStruct->ADC_Mode = ADC_Mode_Independent;
000002  6001              STR      r1,[r0,#0]
;;;280      /* initialize the ADC_ScanConvMode member */
;;;281      ADC_InitStruct->ADC_ScanConvMode = DISABLE;
000004  7101              STRB     r1,[r0,#4]
;;;282      /* Initialize the ADC_ContinuousConvMode member */
;;;283      ADC_InitStruct->ADC_ContinuousConvMode = DISABLE;
000006  7141              STRB     r1,[r0,#5]
;;;284      /* Initialize the ADC_ExternalTrigConv member */
;;;285      ADC_InitStruct->ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_CC1;
000008  6081              STR      r1,[r0,#8]
;;;286      /* Initialize the ADC_DataAlign member */
;;;287      ADC_InitStruct->ADC_DataAlign = ADC_DataAlign_Right;
00000a  60c1              STR      r1,[r0,#0xc]
;;;288      /* Initialize the ADC_NbrOfChannel member */
;;;289      ADC_InitStruct->ADC_NbrOfChannel = 1;
00000c  2101              MOVS     r1,#1
00000e  7401              STRB     r1,[r0,#0x10]
;;;290    }
000010  4770              BX       lr
;;;291    
                          ENDP


                          AREA ||i.ADC_TempSensorVrefintCmd||, CODE, READONLY, ALIGN=2

                  ADC_TempSensorVrefintCmd PROC
;;;1166     */
;;;1167   void ADC_TempSensorVrefintCmd(FunctionalState NewState)
000000  b138              CBZ      r0,|L36.18|
;;;1168   {
;;;1169     /* Check the parameters */
;;;1170     assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;1171     if (NewState != DISABLE)
;;;1172     {
;;;1173       /* Enable the temperature sensor and Vrefint channel*/
;;;1174       ADC1->CR2 |= CR2_TSVREFE_Set;
000002  4908              LDR      r1,|L36.36|
000004  6809              LDR      r1,[r1,#0]
000006  f4410100          ORR      r1,r1,#0x800000
00000a  4a07              LDR      r2,|L36.40|
00000c  f8c21408          STR      r1,[r2,#0x408]
000010  e006              B        |L36.32|
                  |L36.18|
;;;1175     }
;;;1176     else
;;;1177     {
;;;1178       /* Disable the temperature sensor and Vrefint channel*/
;;;1179       ADC1->CR2 &= CR2_TSVREFE_Reset;
000012  4904              LDR      r1,|L36.36|
000014  6809              LDR      r1,[r1,#0]
000016  f4210100          BIC      r1,r1,#0x800000
00001a  4a03              LDR      r2,|L36.40|
00001c  f8c21408          STR      r1,[r2,#0x408]
                  |L36.32|
;;;1180     }
;;;1181   }
000020  4770              BX       lr
;;;1182   
                          ENDP

000022  0000              DCW      0x0000
                  |L36.36|
                          DCD      0x40012408
                  |L36.40|
                          DCD      0x40012000
